import request from "@/utils/request";

export function getTeacherList(params: any) {
    return request({
        url: `/api/teacher/list`,
        method: 'get',
        params: params
    });
}

export function getTeacherById(id: any) {
    return request({
        url: `/api/teacher/getTeacherInfo/${id}`,
        method: 'get',
    });
}

export function addTeacher(data: any) {
    return request({
        url: `/api/teacher/createTeacher`,
        method: 'post',
        data: data
    });
}

export function updateTeacher(data:any) {
    return request({
        url: `/api/teacher/updateTeacherInfo`,
        method: 'put',
        data: data
    });
}

export function deleteTeacher(id: any) {
    return request({
        url: `/api/teacher/${id}`,
        method: 'delete',
    });
}
